home *** CD-ROM | disk | FTP | other *** search
- Path: pcc002.ids-scheer.de!news
- From: Stefan Wesner <wesner@ids-scheer.de>
- Newsgroups: comp.lang.c++
- Subject: Re: Compiling old "C" code with Borland C++ 3.1 HELP
- Date: Fri, 09 Feb 1996 09:05:42 +0000
- Organization: IDS Prof. Scheer GmbH
- Message-ID: <311B0E66.378D@ids-scheer.de>
- References: <4e8es1$ge0@nntp.Stanford.EDU>
- NNTP-Posting-Host: pcg140.ids-scheer.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (WinNT; I)
-
- Scott Wang wrote:
- >
- > I'm trying to compile a C program on Borland C++ 3.1 but I'm
- > having a little trouble. I have custom interfaces that I want to
- > #include but when I try to run it it gets a linking error:
- >
- > Compiling TIMESORT.C:
- > Compiling SORT.C:
- > Linking SORT.EXE:
- > Linker Warning: No module definition file specified: using defaults
- > Linker Error: Undefined symbol _RandomInteger in module TIMESORT.C
- > Linker Error: Undefined symbol _GetBlock in module TIMESORT.C
- > Linker Error: Undefined symbol _GetInteger in module TIMESORT.C
- > Enclose your c-funktion in a extern "c" block
-
- extern "c" {
- // the c-code
-
- }
-
- You prevent your c-function names from a underscore at the beginning.
-
- Hope it will work.
-
- Stefan.
-
-
-
- __&__ Stefan Wesner e-mail: stwe0000@stud.uni-sb.de
- / \ Schulstr. 86 wesner@ids-scheer.de
- | | 66125 Saarbruecken http://www.ee.uni-sb.de/iaeste/STAFF/stefan.html
- | (o)(o)
- C .---_)
- | |.___|
- | \__/
- /_____\
-